<template>
  <div class="hcharts">
    <p :id="id" :option="option"></p>
  </div>
</template>

<script>
  import HighCharts from 'highcharts'
  export default {
    name: 'hcharts',
    components: {},
    props: {
      id: {
        type: String
      },
      //option 是图表的配置数据
      option: {
        type: Object
      }
    },
    data() {
      return{
        
      }
    },
    computed: {},
    watch: {
      qyvalue:{
        deep:true,
        immediate: true,
        handler(newVal,oldVal){
          if (newVal!='') {
          }
        }
      }
    },
    created() {},
    mounted() {
      HighCharts.setOptions({
         lang: {
           thousandsSep: ','
         }
       })
      HighCharts.chart(this.id, this.option)
    },
    methods: {}
  }
</script>
<style scoped lang="less">
  p{
    width: 500Px;
    height: 350Px;
    display: block;
    margin: 60Px auto;
  }
</style>
